<script setup>
import { Edit, Document, UserFilled } from '@element-plus/icons-vue';

</script>

<template>
  <div class="common-layout">
    <el-container class="full-height-container">
      <!-- 头部区域，占 15% 高度 -->
      <el-header class="header">
        <div class="header-content">
          <div class="logo">
            <span class="logo-text">学伴</span>
            <span class="slogan">找到你的最佳学习搭档</span>
          </div>
          <div class="auth-buttons">
            <el-button type="text" class="login-btn" @click="$router.push('/login')">登录</el-button>
            <el-button type="primary" class="register-btn" @click="$router.push('/login')">注册</el-button>
          </div>
        </div>
      </el-header>
      <!-- 主要内容区域，占 70% 高度 -->
      <el-main class="main">
        <div class="banner">
          <div class="banner-text">
            <h1>在校园里，找到<br>最合适的学习伙伴</h1>
            <p>基于课程、专业和学习习惯，帮你精准匹配，一起高效学习</p>
          </div>
          <div class="banner-img">
             <img
                src="../../assets/images/head1.png"
                alt="学生结伴学习的场景"
                class="banner-image"
              >
          </div>
        </div>
        <div class="features">
          <div class="feature-item">
            <el-icon size="24px" color="#27ae60"><Edit /></el-icon>
            <h3>匹配伙伴</h3>
            <p>快速找寻学习伙伴</p>
          </div>
          <div class="feature-item" >
            <el-icon size="24px" color="#27ae60"><Document /></el-icon>
            <h3>组队学习</h3>
            <p>快速组建学习小组</p>
          </div>
          <div class="feature-item">
            <el-icon size="24px" color="#27ae60"><UserFilled /></el-icon>
            <h3>解决疑难</h3>
            <p>高效解决疑难问题</p>
          </div>
        </div>
      </el-main>
      <!-- 底部区域，占 15% 高度 -->
      <el-footer class="footer">
        <div class="footer-left">
          <p>仅限本校学生使用，信息安全可靠</p>
        </div>
        <div class="footer-right">
          <a href="#">帮助中心</a>
          <a href="#">关于我们</a>
        </div>
      </el-footer>
    </el-container>
  </div>
</template>


<style scoped>
/* 最外层容器，占满整个视口高度 */
.common-layout {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
/* 让 el-container 继承父容器高度，并垂直排列子元素 */
.full-height-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}
/* 头部区域，占 15% 高度 */
.header {
  height: 15%;
  background-color: #f0f9f2;
  padding: 0 20px;
  display: flex;
  align-items: center;
   border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) inset;
}
.header-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
}
.logo-text {
  font-size: 40px;
  font-weight: bold;
  color: #27ae60;
  margin-right: 10px;
  margin-left: 50px;

  font-family: "Ma Shan Zheng", "KaiTi", serif;
  font-size: 52px;
  letter-spacing: 10px;
  color: #2c5e2e; /* 深绿色，更显厚重感 */

  /* 1. 基础阴影：静态时的底色阴影 */
  text-shadow: 2px 2px 4px rgba(44, 94, 46, 0.2);

  /* 2. 动画：2秒一个周期，缓慢旋转+位移，模拟“流动” */
  animation: floatMove 2s ease-in-out infinite alternate;
}


.slogan {
  font-size: 30px;
  margin-left: 10px;
  font-style: italic;
  letter-spacing: 1px;
   /* 1. 选舒展字体（优先加载本地书法体，无则 fallback 系统字体） */
  font-family: "Ma Shan Zheng", "KaiTi", "STKaiti", serif;
  font-weight: normal;
  /* 2. 字间距：让字体更舒展，避免拥挤 */
  letter-spacing: 8px;
  /* 3. 轻微变形：x轴轻微倾斜+y轴微抬，模拟手写自然角度 */
  transform: skewX(-3deg) translateY(-2px);
  /* 4. 多层阴影：增强立体感，阴影颜色与文字呼应（这里用柔和绿色） */
  text-shadow:
    1px 1px 2px rgba(39, 174, 96, 0.2),  /* 内层浅影：增强轮廓 */
    3px 3px 6px rgba(39, 174, 96, 0.1);  /* 外层柔影：营造飘逸氛围 */
  /* 5. 文字颜色：选柔和色调，避免刺眼（示例为自然绿，可换 #333/#666 等） */
  color: #27ae60;
}
.login-btn {
  color: #2c5e2e !important;
  font-size:25px;
  text-decoration: none !important;
  padding: 8px 16px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.login-btn:hover {
  color: #27ae60 !important;
  text-decoration: underline !important;
  background-color: rgba(39, 174, 96, 0.05) !important;
}

.register-btn {
  background-color: #27ae60 !important;
  font-size:25px;
  border-color: #27ae60 !important;
  color: #ffffff !important;
  padding: 8px 20px !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.register-btn:hover {
  background-color: #239656 !important;
  border-color: #239656 !important;
  transform: scale(1.02) !important;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2) !important;
}

/* 按钮容器：调整间距，避免拥挤 */
.auth-buttons {
  display: flex;
  gap: 12px;
  margin-right: 200px;

}
/* 主要内容区域，占 70% 高度，内容超出可滚动 */
.main {
  height: 70%;
  background-color: #f8faf7;
  padding: 40px 20px;
  flex: 1;
  overflow: auto;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.02) inset;
  margin-bottom: 5px;
}
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  background: linear-gradient(120deg, #f0f9f2, #e6f7ef);
}
.banner-text{
  padding-left: 150px;
}
.banner-text h1 {
  font-size: 40px;
  color: #1e40af;
  line-height: 1.5;
  font-weight: bold;
  font-family: "Ma Shan Zheng", "KaiTi", serif;
  letter-spacing: 2px;
  text-shadow: 1px 1px 2px rgba(44, 94, 46, 0.2);
  animation: floatMove 2s ease-in-out infinite alternate;
  @keyframes floatMove {
    0% {
      transform: translateY(0);
    }
    100% {
      transform: translateY(-5px);
    }
  }
}
.banner-text p {
  font-size: 20px;
  color: #555;
  margin-top: 10px;
  font-family: "Microsoft YaHei", sans-serif;
  letter-spacing: 1px;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
  animation: floatMove 2s ease-in-out infinite alternate;
  @keyframes floatMove {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-5px);
    }
  }
}
.banner-img {
  width: 350px;
  height: auto;
  margin-right: 150px;
}

.features {
  display: flex;
  justify-content: space-around;
  gap: 20px;
}
.feature-item {
  text-align: center;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.feature-item el-icon {
  margin-bottom: 5px;
  margin-right: 10px;
}
.feature-item h3 {
  font-size: 20px;
  color: #333;
  margin-bottom: 5px;
}
.feature-item p {
  font-size: 17px;
  color: #666;
}
/* 底部区域，占 15% 高度 */
.footer {
  height: 15%;
  background-color: #fff;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-left p {
  font-size: 14px;
  color: #666;
}
.footer-right {
  display: flex;
  gap: 20px;
}
.footer-right a {
  font-size: 14px;
  color: #27ae60;
  text-decoration: none;
}
</style>
